<template>
 <div>
  <el-dialog :title="title" :visible.sync="isShow" @close="handleClose" center>
    <USERCONTRACT v-if="title==='用户协议'"></USERCONTRACT>
    <PRIVACYCONTRACT v-if="title==='隐私条款'"></PRIVACYCONTRACT>
    <el-button type="primary" @click="(isShow=false)" style="margin-left: 50%; transform: translateX(-50%);margin-top: 30px;">确定</el-button>
  </el-dialog>
 </div>
</template>

<script>
export default {
  name: 'contractComponent',
  components: {
    USERCONTRACT: () => import('./userContract.vue'),
    PRIVACYCONTRACT: () => import('./privacyContract.vue')
  },
  props: {
    title: {
      require: true,
      type: String,
      default: ''
    }
  },
  data() {
     return {
      isShow: false
    }
  },
  methods: {
    // 展示条款
    handleClose() {
      this.isShow = false
    }
  }
 }
</script>

<style>

</style>